<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>Grupo12daturma2MIEIC4: C:/Users/Paulo/Documents/FEUP/EclipseWorkSpace/calgrafos/src/Empresa.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css"/>
</head>
<body onload='searchBox.OnSelectItem(0);'>
<!-- Gerado por Doxygen 1.7.4 -->
<script type="text/javascript"><!--
var searchBox = new SearchBox("searchBox", "search",false,'Localizar');
--></script>
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Grupo12daturma2MIEIC4&#160;<span id="projectnumber">1.0</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Página&#160;principal</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Ficheiros</span></a></li>
      <li id="searchli">
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Localizar" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>Lista&#160;de&#160;ficheiros</span></a></li>
      <li><a href="globals.html"><span>Ficheiros&#160;membro</span></a></li>
    </ul>
  </div>
</div>
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
  initNavTree('_empresa_8h.html','');
</script>
<div id="doc-content">
<div class="header">
  <div class="headertitle">
<div class="title">C:/Users/Paulo/Documents/FEUP/EclipseWorkSpace/calgrafos/src/Empresa.h</div>  </div>
</div>
<div class="contents">
<a href="_empresa_8h.html">Ir para a documentação deste ficheiro.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">//============================================================================</span>
<a name="l00002"></a>00002 <span class="comment">// Nome        : Empresa.cpp</span>
<a name="l00003"></a>00003 <span class="comment">// Autores     : T1G7</span>
<a name="l00004"></a>00004 <span class="comment">//                                      Felipe Galvão do Espírito Santo</span>
<a name="l00005"></a>00005 <span class="comment">//                                      Ivanilda Maísa Costa Brazão de Almeida</span>
<a name="l00006"></a>00006 <span class="comment">//                                      Paulo Jorge de Faria dos Reis</span>
<a name="l00007"></a>00007 <span class="comment">// Versão      : 1.0</span>
<a name="l00008"></a>00008 <span class="comment">// Data        : Maio de 2011</span>
<a name="l00009"></a>00009 <span class="comment">// Copyright   : Creative Commons 2.0</span>
<a name="l00010"></a>00010 <span class="comment">// Descrição   : CAL 2011 - TG1</span>
<a name="l00011"></a>00011 <span class="comment">//               Tema 12 - Transporte de pacientes de uma clínica de saúde.</span>
<a name="l00012"></a>00012 <span class="comment">//============================================================================</span>
<a name="l00013"></a>00013 
<a name="l00014"></a>00014 <span class="preprocessor">#ifndef EMPRESA_H_</span>
<a name="l00015"></a>00015 <span class="preprocessor"></span><span class="preprocessor">#define EMPRESA_H_</span>
<a name="l00016"></a>00016 <span class="preprocessor"></span>
<a name="l00017"></a>00017 <span class="preprocessor">#include &lt;cstdio&gt;</span>
<a name="l00018"></a>00018 <span class="preprocessor">#include &lt;queue&gt;</span>
<a name="l00019"></a>00019 <span class="preprocessor">#include &lt;vector&gt;</span>
<a name="l00020"></a>00020 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00021"></a>00021 <span class="preprocessor">#include &lt;math.h&gt;</span>
<a name="l00022"></a>00022 <span class="preprocessor">#include &quot;<a class="code" href="mapas_8h.html">mapas.h</a>&quot;</span>
<a name="l00023"></a>00023 <span class="preprocessor">#include &quot;<a class="code" href="graphviewer_8h.html">graphviewer.h</a>&quot;</span>
<a name="l00024"></a>00024 <span class="preprocessor">#include &quot;<a class="code" href="_sucursal_8h.html">Sucursal.h</a>&quot;</span>
<a name="l00025"></a>00025 <span class="preprocessor">#include &quot;<a class="code" href="_consultas_8h.html">Consultas.h</a>&quot;</span>
<a name="l00026"></a>00026 <span class="preprocessor">#include &quot;<a class="code" href="_interfaces_8h.html">Interfaces.h</a>&quot;</span>
<a name="l00027"></a>00027 <span class="preprocessor">#include &quot;<a class="code" href="_dados_8h.html">Dados.h</a>&quot;</span>
<a name="l00028"></a>00028 <span class="preprocessor">#include &quot;<a class="code" href="_cliente_8h.html">Cliente.h</a>&quot;</span>
<a name="l00029"></a>00029 <span class="preprocessor">#include &quot;<a class="code" href="_auxiliar_8h.html">Auxiliar.h</a>&quot;</span>
<a name="l00030"></a>00030 <span class="preprocessor">#include &quot;<a class="code" href="_data_cal_8h.html">DataCal.h</a>&quot;</span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &quot;<a class="code" href="_graph_8h.html">Graph.h</a>&quot;</span>
<a name="l00032"></a>00032 
<a name="l00033"></a>00033 <span class="keyword">using</span> std::string;
<a name="l00035"></a>00035 
<a name="l00055"></a><a class="code" href="class_empresa.html">00055</a> <span class="keyword">class </span><a class="code" href="class_empresa.html" title="Toda a lógica aplicacional reside nesta classe.">Empresa</a>
<a name="l00056"></a>00056 {
<a name="l00057"></a>00057 <span class="keyword">public</span>:
<a name="l00059"></a>00059         <a class="code" href="class_empresa.html#a20d82aef867ea1edc24d8ffc1f6182ef" title="Funções públicas.">Empresa</a>(<span class="keywordtype">string</span> <a class="code" href="class_empresa.html#a498bb9d730ccb0c5de187676e8b05938" title="A classe de Interface deve conseguir aceder aos dados de Aplicação.">arquivo</a>, <span class="keywordtype">int</span> permissoes = 1);    
<a name="l00060"></a>00060         <a class="code" href="class_empresa.html#a3c03ed7fbfdaa5c8db9b8587451f1326" title="O construtor precisa de saber qual o ficheiro de arquivo dos dados. Valor por defeito 1...">~Empresa</a>();
<a name="l00061"></a>00061         <span class="keywordtype">int</span> <a class="code" href="class_empresa.html#a42179edb167fd7727686935df1468ad7">iniciar</a>();                                  
<a name="l00062"></a>00062         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#adcb87faf1a2528dfcdd9b4854d1fc70f" title="Inicio da aplicação. Lança a interface com o utilizador.">terminar</a>();                                
<a name="l00063"></a>00063 
<a name="l00065"></a>00065 
<a name="l00066"></a>00066         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a4ab0d00ec5bed9072ca31ecd4874879a" title="Termina a aplicação, gravando antes os dados para ficheiro.">gestaoClientes</a>();
<a name="l00067"></a>00067         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#ac75d488cb5afb6dfd89c0a0d4d98b597">gestaoVeiculos</a>();
<a name="l00068"></a>00068         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#affc82ada3400e920c065023d01014a1e">gestaoSucursal</a>();
<a name="l00069"></a>00069         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a02a0e5fddb9c7f6ba9e863ab408a26a4">gestaoConsultas</a>();
<a name="l00070"></a>00070         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a9692aa887b6e73477b35b3356ec64a0b">gestaoRotas</a>();
<a name="l00071"></a>00071 
<a name="l00073"></a>00073         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a1b2752881f37f97f0057c501f805981c" title="Funções relativas a Clientes.">registarCliente</a>();
<a name="l00074"></a>00074         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#ac8e1e8dcfd1cb6291d4d84bdd90eba00" title="Função para alterar os dados do Cliente.">alterarCliente</a>();
<a name="l00075"></a>00075         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a84f868705fc0e2cad181201b79b9ba66">desativarCliente</a>();
<a name="l00076"></a>00076         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#af08b4a3b0d5d1e61b5be2c818fcf56e3">consultarCliente</a>();
<a name="l00077"></a>00077 
<a name="l00079"></a>00079         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#ac8d3747ee3c0b218839a866a2ec4ab7f" title="Funções relativas a Veiculos.">capacidadeVeiculo</a>();
<a name="l00080"></a>00080         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a74fd5a055a7ecefaf246fce9a838fd01">clientesAlocados</a>();
<a name="l00081"></a>00081         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a3eec3ff4dd8f89e9c9222d5c84926e91">sucursalAssociado</a>();
<a name="l00082"></a>00082 
<a name="l00084"></a>00084         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a0eec8d0106205143940e59f54b3651be" title="Funções relativas as Sucursais.">listaClientes</a>();
<a name="l00085"></a>00085         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a5a4c537bff70f5d659ff08ee1f498748">veiculoAssociado</a>();
<a name="l00086"></a>00086         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a99387cca71e4cc5563c3836aabb7ddf7">desativarSucursal</a>();
<a name="l00087"></a>00087 
<a name="l00089"></a>00089         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a6b2518be0de3cfe79f94cfaf2c50f0ad" title="Funções relativas as Consultas.">dadosCliente</a>();
<a name="l00090"></a>00090 
<a name="l00092"></a>00092         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a3ddee1dae5a517442fa258dabf14b9f6" title="Funções relativas a Rotas.">algoritmo1</a>();
<a name="l00093"></a>00093         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#ae0b426285deeb15319c9d088c0899a8f" title="Futuro algoritmo para todas as rotas necessárias para um dia. Com redistribuição de &#39;serviço&#39; por out...">algoritmo2</a>();
<a name="l00094"></a>00094         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#a53039bc33c57efd950110fb0f9378698" title="Futuro algoritmo para todas as rotas necessárias para um dia. Com um veículo a realizar várias viagen...">algoritmo3</a>();
<a name="l00095"></a>00095 
<a name="l00097"></a>00097         <span class="keywordtype">void</span> <a class="code" href="class_empresa.html#ac591260c76685361e9c52880d41286be" title="Visualização.">apresentaRota</a>();
<a name="l00098"></a>00098 
<a name="l00099"></a>00099 
<a name="l00101"></a>00101 <span class="keyword">private</span>:
<a name="l00102"></a><a class="code" href="class_empresa.html#a2cfc4dcbf64fc7207e4d59519218db18">00102</a>     <span class="keyword">static</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_empresa.html#a2cfc4dcbf64fc7207e4d59519218db18" title="Dados privados.">instancias</a>;     
<a name="l00103"></a><a class="code" href="class_empresa.html#a1cf630e1978a80fdc97ddadf02af81d0">00103</a>     <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span> <a class="code" href="class_empresa.html#a1cf630e1978a80fdc97ddadf02af81d0" title="Quantidade de instâncias que estão a ser executadas.">instancia</a>;                     
<a name="l00104"></a><a class="code" href="class_empresa.html#a830b4e5bfcfccd2b61c6dd2f8a74f23f">00104</a>     <a class="code" href="class_interfaces.html" title="Interface com o utilizador.">Interfaces</a> <a class="code" href="class_empresa.html#a830b4e5bfcfccd2b61c6dd2f8a74f23f" title="ID da inst�ncia corrente.">iTex</a>;                            
<a name="l00105"></a><a class="code" href="class_empresa.html#a7d28d4ddfa07998b4dce3eb4f9f14bca">00105</a>     <a class="code" href="class_dados.html" title="Classe para guardar todos os dados da aplicação.">Dados</a> <a class="code" href="class_empresa.html#a7d28d4ddfa07998b4dce3eb4f9f14bca" title="Está na moda as palavras começadas por i... a sério: significa Interface em Texto.">iData</a>;                                        
<a name="l00106"></a><a class="code" href="class_empresa.html#a6cf94b511f9bdb1bf9724656fe5cb0b9">00106</a>     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="class_interfaces.html" title="Interface com o utilizador.">Interfaces</a>;            
<a name="l00107"></a><a class="code" href="class_empresa.html#a498bb9d730ccb0c5de187676e8b05938">00107</a>     <span class="keywordtype">string</span> <a class="code" href="class_empresa.html#a498bb9d730ccb0c5de187676e8b05938" title="A classe de Interface deve conseguir aceder aos dados de Aplicação.">arquivo</a>;                                     
<a name="l00108"></a>00108 
<a name="l00109"></a>00109 };
<a name="l00110"></a>00110 <span class="preprocessor">#endif </span><span class="comment">/* EMPRESA_H_ */</span>
<a name="l00111"></a>00111 
<a name="l00112"></a>00112 <span class="comment">/* Template para Menu</span>
<a name="l00113"></a>00113 <span class="comment"> * vector&lt;string&gt; aMostrar;</span>
<a name="l00114"></a>00114 <span class="comment"> * string confirma;</span>
<a name="l00115"></a>00115 <span class="comment"> * int indice;</span>
<a name="l00116"></a>00116 <span class="comment"> *</span>
<a name="l00117"></a>00117 <span class="comment"> * aMostrar.push_back(string opcoes);</span>
<a name="l00118"></a>00118 <span class="comment"> * iTex.menuNaConsola(aMostrar, &#39;|&#39;, &#39;-&#39;);</span>
<a name="l00119"></a>00119 <span class="comment"> * aMostrar.clear();</span>
<a name="l00120"></a>00120 <span class="comment"> *</span>
<a name="l00121"></a>00121 <span class="comment"> * confirma = textos.smsRetorno(string pergunta);</span>
<a name="l00122"></a>00122 <span class="comment"> * indice = stringParaInteiro(confirma) - 1;</span>
<a name="l00123"></a>00123 <span class="comment"> * */</span>
</pre></div></div>
</div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="_empresa_8h.html">Empresa.h</a>      </li>
      <li class="footer">Gerado em Fri May 13 2011 02:00:24 para Grupo12daturma2MIEIC4 por&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>Tudo</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Ficheiros</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Funções</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variáveis</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Amigos</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>


</body>
</html>
